<div class="breadcrumbs breadcrumbs-fixed ace-save-state">
    <ul class="breadcrumb">
        <li>
            <i class="ace-icon fa fa-users home-icon"></i>
            <a href="#">活动管理</a>
        </li>
        <li class="active">优惠券</li>
    </ul>
</div>

<div class="page-content">
    <div class="row">
        <div class="col-xs-12">
            <h4 class="header smaller lighter blue">用户提现列表</h4>

            <div class="space-6"></div>
            <div class="dataTables_wrapper form-inline no-footer">
                <table id="big_order_table" class="table table-striped table-bordered table-hover">
                    <thead>
                    <tr>
                        <th>编号</th>
                        <th>用户姓名</th>
                        <th>银行名称</th>
                        <th>银行账户</th>
                        <th>提现金额</th>
                        <th>申请时间</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                </table>
            </div>
        </div>
    </div>

    <script type="text/javascript">
        var big_order_table, big_order_validator;
        $(function () {
            big_order_table = $('#big_order_table').DataTable({
                language: {url: 'ace/json/dataTable_CN.json'},
                autoWidth: false,
                ordering: false,
                searching: false,
                serverSide: true,
                processing: true,
                deferRender: true,
                responsive: true,
                ajax: {
                    url: 'management/withdrawList'
                },
                columns: [
                    {
                        data: 'id',
                        defaultContent: ''
                    }, {
                        data: 'name',
                        defaultContent: ''
                    }, {
                        data: 'bankName',
                        defaultContent: ''
                    }, {
                        data: 'bankCode',
                        defaultContent: ''
                    }, {
                        data: 'money',
                        defaultContent: ''
                    }, {
                        data: 'createTime',
                        defaultContent: ''
                    }, {
                        data: function (row) {
                            var editBtn;
                            editBtn = '<a id="editBigOrder" href="javascript:;" data-row="' + row + '" class="btn btn-xs btn-primary"><i class="fa fa-pencil"></i> 打款</a>';
                            return editBtn;
                        }
                    }
                ]
            });


            $('#searchBtn').click(function () {
                var param = $("#searchForm").serialize();
                big_order_table.ajax.url("management/withdrawList?" + param).load();
            });


            //模态框隐藏事件
            $("#big_order_modal").on("hide.bs.modal", function () {
                $("#big_order_form")[0].reset();
                big_order_validator.resetForm();
                $("#big_order_form .form-group").removeClass("has-error");
            });

            $('#big_order_table tbody').on('click', 'a#editBigOrder', function () {
                var row = big_order_table.row($(this).parents("tr")).data();
                $("#big_order_form").autofill(row);
                $("#big_order_modal").modal("show");
            });

        });
    </script>
</div>